package com.service.impl;

import com.dao.Dao;
import com.dao.impl.DaoImpl;
import com.pojo.Account;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userServiceImpl")
public class ServiceImpl implements UserService {
    @Autowired
    private Dao dao;

    public ServiceImpl(DaoImpl dao) {

    }


    @Override
    public int findAll() {
        return dao.findAll();
    }

    @Override
    public Account findById(Integer id) {
        return dao.findById(id);
    }

    @Override
    public void saveAccount(Account account) {
        dao.saveAccount(account);
    }

    @Override
    public void update(Account account) {
        dao.update(account);
    }

    @Override
    public void delete(Integer id) {
        dao.delete(id);
    }

}
